{% extends "_base.html" %}

{% block content %}
    <h3>{{ title }}</h3>
    <form action="{{ submit_addr }}" method="GET">
        按照公司全称/股票代码检索：
        <input type="text" name="companyName" value="{{ value }}">
        <input type="submit">
    </form>
    <hr>
    <div style="vertical-align:middle;">
        {% block table %}
        {% endblock %}
    </div>
    <ul>
        {% if pre %}
            <a href="{{ submit_addr }}?companyName={{ value }}&page={{ pre }}">上一页</a>
        {% else %}
            上一页
        {% endif %}

        {% for pg in pages %}
            {% if pg in ('...', page) %}
                {{ pg }}
            {% else %}
                <a href="{{ submit_addr }}?companyName={{ value }}&page={{ pg }}">{{ pg }}</a>
            {% endif %}
        {% endfor %}

        {% if next %}
            <a href="{{ submit_addr }}?companyName={{ value }}&page={{ next }}">下一页</a>
        {% else %}
            下一页
        {% endif %}
<!--        <form action="{{ submit_addr }}" method="GET">
            跳到<input type="number" name="page">页
            <input type="hidden" value="{{ value }}" name="companyName">
            <input type="submit" value="GO">
        </form>
-->
    </ul>
{% endblock %}
